Home > sgwt_toolbox > utils > sgwt_soft_threshold.m

sgwt_soft_threshold

PURPOSE ^

sgwt_soft_threshold : Soft thresholding operator

SYNOPSIS ^

function x_t = sgwt_soft_threshold(x,tgamma)

DESCRIPTION ^

 sgwt_soft_threshold : Soft thresholding operator

 x_t = bpdq_soft_threshold(x,tgamma)

 Applies soft thresholding  to each component of x

 Inputs:
 x - input signal
 tgamma - threshold

 Outputs:
 x_t - soft thresholded result

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % sgwt_soft_threshold : Soft thresholding operator
0002 %
0003 % x_t = bpdq_soft_threshold(x,tgamma)
0004 %
0005 % Applies soft thresholding  to each component of x
0006 %
0007 % Inputs:
0008 % x - input signal
0009 % tgamma - threshold
0010 %
0011 % Outputs:
0012 % x_t - soft thresholded result
0013 
0014 % This file is part of the SGWT toolbox (Spectral Graph Wavelet Transform toolbox)
0015 % Copyright (C) 2010, David K. Hammond.
0016 %
0017 % The SGWT toolbox is free software: you can redistribute it and/or modify
0018 % it under the terms of the GNU General Public License as published by
0019 % the Free Software Foundation, either version 3 of the License, or
0020 % (at your option) any later version.
0021 %
0022 % The SGWT toolbox is distributed in the hope that it will be useful,
0023 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0024 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0025 % GNU General Public License for more details.
0026 %
0027 % You should have received a copy of the GNU General Public License
0028 % along with the SGWT toolbox.  If not, see <http://www.gnu.org/licenses/>.
0029 
0030 
0031 function x_t = sgwt_soft_threshold(x,tgamma)
0032   tmp=abs(x)-tgamma;
0033   x_t = sign(x).*tmp.*(tmp>0);
0034

Generated on Wed 13-Oct-2010 13:36:39 by m2html © 2003